package com.shujia.interface_;

/*
链式调用
 */
public class Actor {

    int age = 1;

    public static void main(String[] args) {
        Actor actor = new Actor();
        actor.incrAge().incrAge().incrAge().incrAge().incrAge().incrAge().eat();
        System.out.println(actor.age);
    }


    public Actor incrAge() {
        age++;
        return this;
    }

    public void eat() {

    }
}
